calls a function once for each array elements
here now we will create a new array by performing a fucntion on each array elements
Create a new array with all array elements that passes the test
in this example we will find the sum of all the numbers in an array
the reduce() method can accept an initial value.
in this example we will find the sum of all the numbers in an array
in this example we will find the sum of all the numbers in an array
check if all array values are larger than 18: